</main>
</div>
<footer>
    <p>Made with <span class="heart">&hearts;</span> by <a target="_blank" rel="noopener noreferrer"
            href="https://keikaavousi.com">MohammadReza Keikavousi</a></p>
    <a href="https://donate.keikaavousi.com" target="_blank" class="donate">
        <img src='/icons/coffee.svg' />
        Buy me a coffee</a>
</footer>


<script src="/js/polyfill.min.js"></script>
<script>
    let icon = document.getElementById("menu-icon")
    let menu = document.getElementById("menu")

    document.getElementById("menu-icon").addEventListener('click', function (e) {
        icon.classList.toggle("open")
        menu.classList.toggle("open")
        document.body.classList.toggle("fix")
        document.documentElement.classList.toggle("body-fix")
    })
</script>
<script>
    // let targetAnchor = document.getElementById("try")

    let links = document.querySelectorAll("a[href*='#']")

    for (let i = 0; i < links.length; i++) {
        links[i].addEventListener('click', function (e) {
            e.preventDefault()

            let hash = links[i].hash
            let targetAnchor = document.querySelector(hash)
            console.log(hash, targetAnchor.offsetTop, window.scrollY)

            window.scrollTo({
                top: targetAnchor.offsetTop + 620,
                behavior: 'smooth'
            });

        })
    }

    const close_alert = document.getElementById('close_alert')
    const donate_alert = document.getElementById('donate_alert')
    close_alert.addEventListener('click', () => {
        donate_alert.style.display = 'none'
    })
</script>

</body>

</html>